<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function f_year(f_start,f_end){
            for(var i = f_start; i <= f_end; i++){
                if(i%4 == 0 && i%100 != 0 || i%400 == 0){
                    document.write(i+"&nbsp;")
                }
            }
        }
        var start = Number(prompt("开始年份"));
        var end = Number(prompt("终止年份"));
        f_year(start,end);
    </script>
</body>
</html>